package com.zrgg.futuwen.network;


import com.zrgg.futuwen.BuildConfig;

import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;


/**
 * Created by LL on 16/3/8.
 * Retrofit 工厂类
 */
public class RetrofitFactory {
    /**
     * 创建retrofit的build 普通的builder
     */
    public static Retrofit.Builder creatRetrofit() {
        return new Retrofit.Builder()
                .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                .addConverterFactory(GsonConverterFactory.create())
                .client(OkHttpFactory.creatOkhttp().build())
                .baseUrl(BuildConfig.API_URL + "/");
    }
}
